<?php

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
Route::group(['namespace'=>'Wechat', 'prefix' => 'wechat', 'middleware' => ['wechat.config','ao']], function (){
    Route::any('/server', 'ServerController@server');
    Route::get('/menu/set', 'ServerController@setMenu');
    Route::get('/js/sdk', 'ServerController@getJsSdk');
    Route::get('/login', 'ServerController@login');
});

Route::group(['namespace'=>'Api', 'prefix' => 'wechat', 'middleware' => ['wechat.config','ao']], function (){
    Route::get('/callback-login', 'UserController@weixinCallback');
});

Route::group(['namespace'=>'Api', 'prefix' => 'activity', 'middleware' => ['ao', 'ApiAuth']], function (){
    Route::get('/banner', 'ActivityController@banner');
    Route::get('/classify', 'ActivityController@classify');
    Route::get('/list', 'ActivityController@activity');
    Route::get('/info', 'ActivityController@activityInfo');
    Route::get('/introduce', 'ActivityController@getIntroduce');
    Route::post('/lxr/add', 'ActivityController@addLxr');
    Route::post('/lxr/update', 'ActivityController@updateLxr');
    Route::post('/lxr/delete', 'ActivityController@deleteLxr');
    Route::post('/enroll', 'ActivityController@enroll');
    Route::get('/lxr', 'ActivityController@lxr');
    Route::get('/lxr/info', 'ActivityController@lxrInfo');
    Route::post('/zhaopin', 'UserController@zhaopin');
    Route::get('/user', 'UserController@userInfo');
    Route::get('/enroll/activity', 'UserController@enrollActivity');

    Route::get('/hj', 'ActivityController@gather');

});